import request from '@/utils/request/index.js'
export default {
	
	/**
	 * 获取推荐标签
	 */
	getRecomTagList(){
		return request.request({
			url:'/h5/noctag/list',
			method: 'post',
			data:{
				recomFlag: 1,
				page: 1,
				limit: 8
			}
		})
	},
	/**保存标签
	 * @param {Object} tagName
	 */
	saveTag(tagName){
		return request.request({
			url: '/h5/noctag/save',
			method: 'post',
			data: {
				tagName:tagName,
			},
		})
	},
	/** 发布需求
	 * @param {Object} title
	 * @param {Object} content
	 * @param {Object} imgList
	 * @param {Object} tagList
	 * @param {Object} ifPhone
	 * @param {Object} demandClassifyId
	 */
	saveDemand(title,content,imgList,tagList,ifPhone,demandClassifyId,quantity,origin,priceStart,priceEnd){
		return request.request({
			url:'/h5/nocdemand/save',
			method:'post',
			data:{
				title: title,
				content: content,
				imgList: imgList,
				tagList: tagList,
				ifPhone: ifPhone,
				delFlag : 3,
				demandClassifyId: demandClassifyId,
				quantity:quantity,
				origin:origin,
				priceStart:priceStart,
				priceEnd:priceEnd
			}
		})
	},
	/**
	 * 获取需求分类
	 */
	getDemandClassify(){
		return request.request({
			url:'/h5/nocdemandclassify/queryAll',
			method: 'post',
			data:{}
		})
	},
	/**获取
	 * @param {Object} classId
	 */
	getClassNameStr(classId) {
		return request.request({
			url: '/h5/nocclassify/queryClassNameStr',
			method: 'post',
			data: {
				classId: classId
			},
		})
	},
	/**
	 * 获取需求分类列表
	 * @returns {*}
	 */
	getOriginClassify() {
		return request.request({
			url: '/base/baseoriginclassify/queryList',
			method: 'post',
			data: {},
		})
	},
	/**
	 * 获取品牌分类列表
	 * @returns {*}
	 */
	getBrandClssify() {
		return request.request({
			url: '/base/basebrandclassify/queryList',
			method: 'post',
			data: {},
		})
	},
	/**
	 * 获取行业列表
	 * @returns {*}
	 */
	getIndustry() {
		return request.request({
			method: 'post',
			url: '/base/baseindustry/querylist',
			data: {},
		})
	},
	/**
	 *获取产品参数列表
	 * @param classId
	 * @returns {*}
	 */
	getProductAttrList(classId) {
		return request.request({
			method: 'post',
			url: '/h5/nocattributeoption/querylist',
			data: {
				classId: classId
			},
		})
	},

}